from django.shortcuts import render

# Create your views here.
from rest_framework.response import Response

from rest_framework.views import APIView
from .models import User

class RegisterUsernameCountAPIView(APIView):
    def get(self,request,username):
        count=User.objects.filter(username=username).count()


        data={
            'count':count
        }
        return Response(data)
